import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/Admin/Login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/Admin/Info',
    method: 'get',
    params: { token }
  })
}

export function create(data) {
  return request({
    url: '/Admin/Create',
    method: 'post',
    data
  })
}

export function update(params, data) {
  return request({
    url: '/Admin/Update',
    method: 'post',
    params,
    data
  })
}

export function page(params) {
  return request({
    url: '/Admin/page',
    method: 'get',
    params
  })
}

export function deleteAdmin(params) {
  return request({
    url: '/Admin/Delete',
    method: 'get',
    params
  })
}

export function get(params) {
  return request({
    url: '/Admin/get',
    method: 'get',
    params
  })
}

export function lock(data) {
  return request({
    url: '/Admin/lock',
    method: 'post',
    data
  })
}

export function updatemobile(data) {
  return request({
    url: '/admin/updatemobile',
    method: 'post',
    data
  })
}

export function logout() {
  return request({
    url: '/Admin/logout',
    method: 'post'
  })
}
